<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Geo3DML-CPP: include/g3dxml/XMLReaderHelper.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Geo3DML-CPP
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_08a06df9a3e103bd7de742ab8c39910f.html">g3dxml</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">XMLReaderHelper.h</div></div>
</div><!--header-->
<div class="contents">
<a href="_x_m_l_reader_helper_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">// UTF-8编码</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="preprocessor">#include &lt;libxml/xmlreader.h&gt;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="preprocessor">#include &lt;<a class="code" href="geo3dml_2_object_factory_8h.html">geo3dml/ObjectFactory.h</a>&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceg3dxml.html">g3dxml</a> {</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span> </div>
<div class="foldopen" id="foldopen00009" data-start="{" data-end="};">
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"><a class="line" href="classg3dxml_1_1_x_m_l_reader_helper.html">    9</a></span>    <span class="keyword">class </span><a class="code hl_class" href="classg3dxml_1_1_x_m_l_reader_helper.html">XMLReaderHelper</a> {</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span>    <span class="keyword">public</span>:</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"><a class="line" href="classg3dxml_1_1_x_m_l_reader_helper.html#a12b331ce86ae1ea9aa733a1411df6dc7">   12</a></span>        <span class="keyword">static</span> std::string <a class="code hl_function" href="classg3dxml_1_1_x_m_l_reader_helper.html#a12b331ce86ae1ea9aa733a1411df6dc7">DectectFileEncoding</a>(<span class="keyword">const</span> std::string&amp; filePath);</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="classg3dxml_1_1_x_m_l_reader_helper.html#a289f21fa1b8855d82dd439f13cf855fe">   13</a></span>        <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classg3dxml_1_1_x_m_l_reader_helper.html#a289f21fa1b8855d82dd439f13cf855fe">IsUTF8</a>(<span class="keyword">const</span> std::string&amp; encodingName);</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="classg3dxml_1_1_x_m_l_reader_helper.html#a199b6170ff3d8ea2be14a35e249362e3">   14</a></span>        <span class="keyword">static</span> std::string <a class="code hl_function" href="classg3dxml_1_1_x_m_l_reader_helper.html#a199b6170ff3d8ea2be14a35e249362e3">FormatErrorMessageAboutEncoding</a>(<span class="keyword">const</span> std::string&amp; encodingName, <span class="keyword">const</span> std::string&amp; filePath);</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="classg3dxml_1_1_x_m_l_reader_helper.html#ad7a93ee9408141ed6ffd5256c9c80f13">   17</a></span>        <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classg3dxml_1_1_x_m_l_reader_helper.html#ad7a93ee9408141ed6ffd5256c9c80f13">IsRelativePath</a>(<span class="keyword">const</span> std::string&amp; path);</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="classg3dxml_1_1_x_m_l_reader_helper.html#afd539c3efaa1f8943ae039b1d1af3db1">   24</a></span>        <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classg3dxml_1_1_x_m_l_reader_helper.html#afd539c3efaa1f8943ae039b1d1af3db1">TextNode</a>(xmlTextReaderPtr reader, <span class="keyword">const</span> std::string&amp; element, std::string&amp; str);</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="classg3dxml_1_1_x_m_l_reader_helper.html#ad320cbbc358eabd1721e01ee288b1f4f">   29</a></span>        <span class="keyword">static</span> std::string <a class="code hl_function" href="classg3dxml_1_1_x_m_l_reader_helper.html#ad320cbbc358eabd1721e01ee288b1f4f">AttributeGMLID</a>(xmlTextReaderPtr reader);</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="classg3dxml_1_1_x_m_l_reader_helper.html#af85057b5b310cfc798e8e2fce4d0e59c">   34</a></span>        <span class="keyword">static</span> std::string <a class="code hl_function" href="classg3dxml_1_1_x_m_l_reader_helper.html#af85057b5b310cfc798e8e2fce4d0e59c">Attribute</a>(xmlTextReaderPtr reader, <span class="keyword">const</span> std::string&amp; attribute);</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="classg3dxml_1_1_x_m_l_reader_helper.html#ace2e3cd561f9ae0ea5b0e5a9dc569c7c">   38</a></span>        <span class="keyword">static</span> std::string <a class="code hl_function" href="classg3dxml_1_1_x_m_l_reader_helper.html#ace2e3cd561f9ae0ea5b0e5a9dc569c7c">AttributeIdInHref</a>(xmlTextReaderPtr reader);</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="classg3dxml_1_1_x_m_l_reader_helper.html#a686e04fd2babd4e061012381c221b749">   40</a></span>        <span class="keyword">static</span> std::string <a class="code hl_function" href="classg3dxml_1_1_x_m_l_reader_helper.html#a686e04fd2babd4e061012381c221b749">FormatErrorMessageWithPosition</a>(xmlTextReaderPtr reader, <span class="keyword">const</span> std::string&amp; message);</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>    };</div>
</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>}</div>
<div class="ttc" id="aclassg3dxml_1_1_x_m_l_reader_helper_html"><div class="ttname"><a href="classg3dxml_1_1_x_m_l_reader_helper.html">g3dxml::XMLReaderHelper</a></div><div class="ttdef"><b>Definition</b> XMLReaderHelper.h:9</div></div>
<div class="ttc" id="aclassg3dxml_1_1_x_m_l_reader_helper_html_a12b331ce86ae1ea9aa733a1411df6dc7"><div class="ttname"><a href="classg3dxml_1_1_x_m_l_reader_helper.html#a12b331ce86ae1ea9aa733a1411df6dc7">g3dxml::XMLReaderHelper::DectectFileEncoding</a></div><div class="ttdeci">static std::string DectectFileEncoding(const std::string &amp;filePath)</div><div class="ttdoc">Detect file's encoding.</div></div>
<div class="ttc" id="aclassg3dxml_1_1_x_m_l_reader_helper_html_a199b6170ff3d8ea2be14a35e249362e3"><div class="ttname"><a href="classg3dxml_1_1_x_m_l_reader_helper.html#a199b6170ff3d8ea2be14a35e249362e3">g3dxml::XMLReaderHelper::FormatErrorMessageAboutEncoding</a></div><div class="ttdeci">static std::string FormatErrorMessageAboutEncoding(const std::string &amp;encodingName, const std::string &amp;filePath)</div></div>
<div class="ttc" id="aclassg3dxml_1_1_x_m_l_reader_helper_html_a289f21fa1b8855d82dd439f13cf855fe"><div class="ttname"><a href="classg3dxml_1_1_x_m_l_reader_helper.html#a289f21fa1b8855d82dd439f13cf855fe">g3dxml::XMLReaderHelper::IsUTF8</a></div><div class="ttdeci">static bool IsUTF8(const std::string &amp;encodingName)</div></div>
<div class="ttc" id="aclassg3dxml_1_1_x_m_l_reader_helper_html_a686e04fd2babd4e061012381c221b749"><div class="ttname"><a href="classg3dxml_1_1_x_m_l_reader_helper.html#a686e04fd2babd4e061012381c221b749">g3dxml::XMLReaderHelper::FormatErrorMessageWithPosition</a></div><div class="ttdeci">static std::string FormatErrorMessageWithPosition(xmlTextReaderPtr reader, const std::string &amp;message)</div></div>
<div class="ttc" id="aclassg3dxml_1_1_x_m_l_reader_helper_html_ace2e3cd561f9ae0ea5b0e5a9dc569c7c"><div class="ttname"><a href="classg3dxml_1_1_x_m_l_reader_helper.html#ace2e3cd561f9ae0ea5b0e5a9dc569c7c">g3dxml::XMLReaderHelper::AttributeIdInHref</a></div><div class="ttdeci">static std::string AttributeIdInHref(xmlTextReaderPtr reader)</div><div class="ttdoc">从XML标签的 xlink:href 属性中提取ID值。</div></div>
<div class="ttc" id="aclassg3dxml_1_1_x_m_l_reader_helper_html_ad320cbbc358eabd1721e01ee288b1f4f"><div class="ttname"><a href="classg3dxml_1_1_x_m_l_reader_helper.html#ad320cbbc358eabd1721e01ee288b1f4f">g3dxml::XMLReaderHelper::AttributeGMLID</a></div><div class="ttdeci">static std::string AttributeGMLID(xmlTextReaderPtr reader)</div><div class="ttdoc">读取XML标签的gml:id属性值。</div></div>
<div class="ttc" id="aclassg3dxml_1_1_x_m_l_reader_helper_html_ad7a93ee9408141ed6ffd5256c9c80f13"><div class="ttname"><a href="classg3dxml_1_1_x_m_l_reader_helper.html#ad7a93ee9408141ed6ffd5256c9c80f13">g3dxml::XMLReaderHelper::IsRelativePath</a></div><div class="ttdeci">static bool IsRelativePath(const std::string &amp;path)</div><div class="ttdoc">Check whether a path is relative.</div></div>
<div class="ttc" id="aclassg3dxml_1_1_x_m_l_reader_helper_html_af85057b5b310cfc798e8e2fce4d0e59c"><div class="ttname"><a href="classg3dxml_1_1_x_m_l_reader_helper.html#af85057b5b310cfc798e8e2fce4d0e59c">g3dxml::XMLReaderHelper::Attribute</a></div><div class="ttdeci">static std::string Attribute(xmlTextReaderPtr reader, const std::string &amp;attribute)</div><div class="ttdoc">读取XML标签的某属性值。</div></div>
<div class="ttc" id="aclassg3dxml_1_1_x_m_l_reader_helper_html_afd539c3efaa1f8943ae039b1d1af3db1"><div class="ttname"><a href="classg3dxml_1_1_x_m_l_reader_helper.html#afd539c3efaa1f8943ae039b1d1af3db1">g3dxml::XMLReaderHelper::TextNode</a></div><div class="ttdeci">static bool TextNode(xmlTextReaderPtr reader, const std::string &amp;element, std::string &amp;str)</div></div>
<div class="ttc" id="ageo3dml_2_object_factory_8h_html"><div class="ttname"><a href="geo3dml_2_object_factory_8h.html">ObjectFactory.h</a></div></div>
<div class="ttc" id="anamespaceg3dxml_html"><div class="ttname"><a href="namespaceg3dxml.html">g3dxml</a></div><div class="ttdef"><b>Definition</b> MultiTIN.h:8</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
